/**
 * 
 */
package cn.salesuite.movie.prefs;

import android.content.Context;
import cn.salesuite.movie.config.Constant;
import cn.salesuite.saf.prefs.BasePrefs;

/**
 * @author Tony Shen
 *
 */
public class UserPrefs extends BasePrefs{

	private static final String USERNAME = "username";
	private static final String PASSWORD = "password";
	private static final String MOBILENUMBER = "moblie_number";
	
	private UserPrefs(Context context) {
		super(context, Constant.SHARED);
	}

	public static UserPrefs get(Context context) {
		return new UserPrefs(context);
	}
	
	public void setUserName(String userName) {
		putString(USERNAME,userName);
	}
	
	public String getUserName() {
		return getString(USERNAME, null);
	}
	
	public void setPassword(String password) {
		putString(PASSWORD,password);
	}
	
	public String getPassword() {
		return getString(PASSWORD, null);
	}
	
	public void setTelephone(String number) {
		putString(MOBILENUMBER,number);
	}
	
	public String getTelephone() {
		return getString(MOBILENUMBER, null);
	}
}
